/**
 * Default JavaScript Framework engine for the whole application
 *
 * Existing choices :
 * - prototype (Prototype 1.6)
 * - jQuery (jQuery 1.3)
 */
Archetype.engine = "jQuery";

/**
 * Default logger for the whole application
 *
 * Existing choices :
 * - alert : use basic JavaScript alert function, beware this is ugly and very intrusif (and probably without end...)
 * - body : insert logs into the page body, not very beautiful but useful for browser compatibility
 * - firebug : redirect logs into firebug console (but also in Safari, Opera and Chrome: it's based on "console.log")
 * - nitobibug : redirect logs into the nitobibug interface
 * - null : no logs, useful for production
 * - piDebugger : redirect logs into the piDebugger interface
 */
Archetype.logger = "firebug";

/**
 * Default template interpretation for the whole application
 * Set value to "null" if you don't use templates
 * Existing choices :
 * - ejs : simple and performant ERB like template system. (http://embeddedjs.com/)
 * - trimpath : Smarty like template engine. (http://code.google.com/p/trimpath/wiki/JavaScriptTemplates)
 * - tal : a JavaScript TAL (Template Attribute Language) interpreter. (http://wiki.zope.org/ZPT/TALSpecification14)
 */
Archetype.template = "ejs";


/**
 * Describes paths to : modules, subModules and dependencies (only required if not "natural")
 */
Archetype.modules = {
	/**
	 * Possible options:
	 * - aPath: absolute path for the file
	 * - rPath: relative path from Archetype path to the javascript files
	 * - subModules: Use it to include multiple files at once with a common denomination,
	 *               arranged like subclass of a class path.
	 *               Example: "scriptaculous" embeds the core "scriptaculous.core",
	 *               the builder "scriptaculous.builder", etc.
	 * - needs: Use it for loading files before the one defined /!\ incompatible with subModules at the same time.
	 */

     /** Bootstrap dependency : no support for needs or submodule **/
	//-- Prototype related
    'Archetype.libs.prototype':{rPath:"Archetype.libs.prototype.1#6#0#3"},
    //-- Comment this out in order to use Google CDN for delivering the file
    //'Archetype.libs.prototype.prototype':{aPath:"http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype"},
    //--


    //-- Comment this out in order to use Google CDN for delivering the file
    //'Archetype.libs.jQuery.jquery':{aPath:"http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"},
    //-- or this one if you want to debug (bigger)
    //'Archetype.libs.jQuery.jquery':{aPath:"http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.js"},

    /** Implementation dependencies, these can use needs (they aren't transitive however) but not subModules **/
    //-- engines dependencies
	"Archetype.engine.jQueryEngine":{needs:["Archetype.libs.jQuery.jquery"]},
	"Archetype.engine.prototypeEngine":{needs:["Archetype.libs.prototype.prototype"]},
	//--

    //-- logger related
	'Archetype.logger.piDebuggerLogger':{needs:["Archetype.libs.pidebugger.SOURCE.pi", "Archetype.libs.pidebugger.SOURCE.debugger"]},
    	'Archetype.logger.nitobibugLogger':{needs:["Archetype.libs.nitobibug.nitobiBug"]},
    //--
    /** End of Bootstrap dependencies, you can use needs or subModules**/

    //-- components related
	'Archetype.component':{
			subModules:["abstractComponent","componentManager"],
			needs:["Archetype.Joiners"]},
	'Archetype.component.componentManager':{needs:["Archetype.component.facetManager"]},
	'Archetype.component.facetManager':{needs:["Archetype.component.facets"]},
	'Archetype.component.facets':{subModules:["logFacet","scopeFacet","eventListenerFacet","eventSenderFacet","observeFacet"]},
	'Archetype.Joiners':{needs:["Archetype.Class"]},
    //--

    //-- templates related
	'Archetype.template.talTemplate':{needs:["Archetype.template.abstractTemplate", "Archetype.libs.tal.domtal"]},
	'Archetype.template.trimpathTemplate':{needs:["Archetype.template.abstractTemplate", "Archetype.libs.jst.trimpath-template"]},
	'Archetype.template.ejsTemplate':{needs:["Archetype.template.abstractTemplate", "Archetype.libs.ejs.ejs_production"]},
	'Archetype.template.regexpTemplate':{needs:["Archetype.template.abstractTemplate"]},
	//--


	//-- Scriptaculous related
	'scriptaculous':{rPath:"Archetype.libs.script#aculo#us", subModules:["builder","controls","dragdrop","effects","slider","sound"]},
    //-- Comment this out in order to use Google CDN for delivering the file
    //'Archetype.libs.script#aculo#us':{aPath:"http://ajax.googleapis.com/ajax/libs/scriptaculous/1.8.2"},
    //--
	'scriptaculous.controls':{needs:["scriptaculous.effects"]},
	'scriptaculous.dragdrop':{needs:["scriptaculous.effects"]},

    'shuttle5': {rPath:''},
     //-- jQuery related
    'Archetype.libs.jQuery.jquery':{rPath:"lib.js.jquery-1#4#2#min"}
};

/**
 * Modules loaded when environnement is ok
 */
Archetype.defaultModules = ["Archetype.component"];

Archetype.pages = {
	/**
	 * relativePathToPages is the relative path from Archetype folder to search for start files
	 *
	 * @example You store your html files (which will be the destination of the
	 *			asking URL) with archetype.js in "http://myhost.com/myfolder/" and
	 *			you want your start files to be in "http://myhost.com/myfolder/Pages",
	 *			then set relativePathToPages: "Pages/".
	 * @example archetype.js is in "http://myhost.com/myfolder/", your
	 *			html file is in "http://myhost.com/myfolder/html/",
	 *			using relativePathToPages: "Pages/", then your start file has to be in
	 *			"http://myhost.com/myfolder/Pages/html/".
	 * @example archetype.js is in "http://myhost.com/myfolder/", your
	 *			html file is in "http://myhost.com/myfolder/html/",
	 *			using relativePathToPages: "../Pages/", then your start file
	 *			has to be in "http://myhost.com/myfolder/Pages/"
	 *			(may not work depending of your web server configuration).
	 * @example You want to have your html and start file in the same directory, just use
	 *			relativePathToPages: "".
	 */
	relativePathToPages: "pages/",
	/**
	 * defaultPage is the default page file used when using automatic index on the web server.
	 *
	 * @example Your web browser is on "http://myhost.com/myfolder/", your
	 *			web server displays you "http://myhost.com/myfolder/Index.html"
	 *			but as Archetype can't know this from the URL, just define here what
	 *			the default start file is: defaultPage: "Index"
	 */
	defaultPage: "shuttle5"
};

/**
 * Default Method Builders, activated for all components
 */
Archetype.defaultMethodBuilders = [
	"public_private",
	"eventListeners",
	"eventSenders",
	"observe",
    "logger"
];

/**
 * Default logger for the whole application
 */
//Archetype.logger = "Archetype.log.firebugLogger";

/**
 * Default charset for javascript files
 */
Archetype.charset = 'iso-8859-1';

/**
 * Configure the known extensions of Archetype.
 * It's used in the interpretation of ajax/library or other dynamic load
 */
Archetype.extensions = {
	js: ["js"],
	css: ["css"],
	html: ["html", "htm", "phtml", "txt"]
}

/**
 * Configure the known extensions of Archetype.
 * It's used in the interpretation of ajax/library or other dynamic load
 */
Archetype.defaultExtensions = {
	js: "js",
	css: "css",
	html: "html"
}

//-- expert settings --
Archetype.useArchetypeClass = true;
Archetype.useEvents = true;

Archetype.classOverride = false;


Archetype.debugJoiner = false;
Archetype.debugLoadLayers = false;
Archetype.debugLoader = false;
Archetype.debugComponentManager = false;
Archetype.debugResolver = false;
Archetype.debugLoadImplementation = false;

Archetype.concurentXhrLimit = 6;
//--
